import { RMIObject } from "../../Engine/RMI/RMIObject";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SeqPlayerItemHelper } from "../Public/SeqPlayerItemHelper";
import { SeqItemUpdateConsumeHelper } from "./SeqItemUpdateConsumeHelper";
import { Exception } from "../../Framework/Util/Exception";
type int = number;
//class AMI_IItem_equipDecompose
    
    export  class AMI_IItem_equipDecompose extends RMIObject
    {
        constructor(arg1?: Function, arg2?: Function, arg3?: any)
        {
            super(arg1, arg2);
            this.userObject = arg3;
            this.callFunction = "equipDecompose";
            return;
        }

        public /* override */ __response(arg1: SerializeStream): void
        {
            var __is: SerializeStream;
            var resultPlayerItem: Array<any>;
            var itemUpdateConsumes: Array<any>;
            var __ret: int;

            var loc1;
            resultPlayerItem = null;
            itemUpdateConsumes = null;
            __ret = 0;
            __is = arg1;
            try 
            {
                resultPlayerItem = SeqPlayerItemHelper.read(__is);
                itemUpdateConsumes = SeqItemUpdateConsumeHelper.read(__is);
                __ret = __is.readInt();
            }
            catch (__ex)
            {
                this.cdeException(new Exception("ExceptionCodeSerialize", Exception.ExceptionCodeSerialize));
                return;
            }
            this.cdeResponse(__ret, resultPlayerItem, itemUpdateConsumes);
            return;
        }

        public cdeResponse(arg1: int, arg2: Array<any>, arg3: Array<any>): void
        {
            if (this._response)  
            {
                this._response.call(null, this, arg1, arg2, arg3);
            }
            return;
        }
    }
